using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(Camera))]
public class InspectorExtention : Editor
{
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        if (GUILayout.Button("TestBtn"))
        {
            var camera = target as Camera;
            // do something
        }
    }

    [MenuItem("CONTEXT/Camera/Modify")]
    static void ModifyCameraForContextMenuEntry(MenuCommand cmd)
    {
        var camera = cmd.context as Camera;
        // do something
    }
}